#########################
#   Author : leilei qin    #
#   Date : 2025/06/25   #
#   Id : SM2892         #
#########################

from compareResult.compareUtils import Compare
from dbResps.queryEmployPerformanceReport import *
from apiRespsAnalyze.queryEmployPerformanceReportFromApi import *

# 非当天 6/17号
startTime = 1718557200000
endTime = 1718729999000
# startTime = 1717520400000
# endTime = 1717606799000

getHistoryEmployPerformanceFromDB_Result = getHistoryEmployPerformanceReportFromDB(startTime, endTime)
getEmployPerformanceFromApi_Result = queryEmployPerformanceReport(startTime, endTime)

if __name__ == "__main__":
    compareResult = Compare.compare(getHistoryEmployPerformanceFromDB_Result, getEmployPerformanceFromApi_Result)
    if compareResult:
        print('compare success')
    else:
        print('compare fail')
        print(getHistoryEmployPerformanceFromDB_Result)
        print(getEmployPerformanceFromApi_Result)